home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_pyr_torch.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  81 lines

  1. # Jones 3D Cog Script
  2. #
  3. # pyr_torch.cog
  4. #
  5. # Light a torch
  6. #
  7. # [SXC] [RKD]
  8. #
  9. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ========================================================================================
  12.  
  13. symbols
  14.  
  15. message     activated
  16. message     startup
  17.  
  18. # world things
  19. thing       torch
  20. thing       flame    nolink
  21. thing        player    local
  22.  
  23. # sounds
  24. sound        lightsound=gen_torchlitet_c.wav    local
  25. sound       burning=gen_torch_burnin_c.wav  local
  26.  
  27. # surface that gives indy another activation possibility
  28. surface        lightit
  29.  
  30. # variables
  31. int         locked=0    local
  32. flex        reach=0        # 0 for medium, 1 for high
  33. end
  34.  
  35. # ========================================================================================
  36.  
  37. code
  38.  
  39. startup:
  40.     SetThingFlags(flame, 0x10);
  41.  
  42.     return;
  43.  
  44. # ........................................................................................
  45. activated:
  46.     if (locked) return;
  47.     locked = 1;
  48.  
  49.     player = GetLocalPlayerThing();
  50.  
  51.     if ((GetCurWeapon(player) != 13) && (!InEditor())) return;
  52.     
  53.     SetActorFlags(player, 0x200000);
  54.     StopThing(player);
  55.  
  56.     PlayMode(player, (60 + reach), 0);
  57.     Sleep(0.5);
  58.  
  59.     ClearThingFlags(flame, 0x10);
  60.     PlaySoundThing(lightsound, torch, 0.4, 3, 10, 0);
  61.     SetThingLight(torch, '0.87 0.55 0.06', 0.3, 0.5);
  62.         
  63.     Sleep(0.5);
  64.  
  65.     PlaySoundThing(burning, torch, 1, 3, 10, 1);
  66.     
  67.     Sleep(0.25);
  68.     ClearActorFlags(player, 0x200000);
  69.     return;
  70.  
  71. # ........................................................................................
  72.  
  73. end
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.